from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen('http://php.cppedu.net/function.substr.html')
bs4Obj = BeautifulSoup(html.read(), "html.parser")
nameList = bs4Obj.findAll('span', {'class':'dc-title'})
print(nameList)
for name in nameList:
    print(name.get_text())
